#@web_layout?()
#define css()
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/layer.css?#(getUUID())" />
<link rel="stylesheet" type="text/css" href="#(contextPath)/assets/front/web/css/main.css?#(getUUID())" />
<style>
	.tipso_style{
		border:0
	}
</style>
#end
#define content()
<div class="c-article" style="min-height:100%;">
    <form id="editTaskForm">
        <input type="hidden" id="id" name="task.id" value="#(task.id??'')">
    <div class="g-info">
        <div class="u-title">编辑任务信息</div>
        <div class="m-panel" style="border-radius: 2px">
            <div class="m-row">
                <div class="u-row-title">任务标题:</div>
                <div class="u-row-box">
                    <div class="u-row-box-input">
                    #(task.task_title??"")
                    </div>
                </div>
            </div>
            <div class="m-row">
                <div class="u-row-title">任务说明:</div>
                <div class="u-row-box">
                    <div class="u-row-box-textarea">
                        <textarea id="task_description" placeholder="请输入任务说明，400字符以内"
                        name="desc" class="u-row-cell-textarea" maxlength="400">#(task.task_description??"")</textarea>
                    </div>
                </div>
            </div>
            <div class="m-row">
                <div class="task-next" id="editTaskBtn" >保存</div>
            </div>
        </div>
    </div>
    </form>
</div>
#end
#define script()
<script src="#(contextPath)/assets/front/web/script/ajax.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
    	$("#editTaskBtn").on("click",function(){
    		$.ajax({
    	        type:"post",
    	        url:"/platform/task/doUpdateTask",
    	        datatype:"json",
    	        data:{
    	            id: $("#id").val(),
    	            desc: $("#task_description").val(),
    	        },
    	        success:function(resp){
    	        	layer.alert(resp.msg);
    	        }
    		});
    	});
    });
</script>

#end